Distinguishing bar code types by comparing bar block sizes

ABSTRACT

A bar code reading apparatus includes a bar code reader for generating, in a single operation, plural pieces of bar block data corresponding to a bar code having a number of digits which is a predetermined standard value, for example, 8 or 13. A detector detects the numbers of digits in each piece of bar block data generated by the bar code reader 11. A four digit memory and a six digit memory are used to store bar block data having four digits and six digits, respectively. A comparator detects whether or not the four digit memory and six digit memory each store bar block data. Each piece of bar block data output from the bar code reader 11 is stored in either the four digit memory or the six digit memory depending upon the number of digits detected by the digit detector. If the comparator determines that bar block data is stored in both the four digit memory and the six digit memory, then it is determined that the bar code reading operation is erroneous.

BACKGROUND OF THE INVENTION

1. Technical Field

The present invention relates to a bar code reading method andapparatus.

2. Background Art

Labels having bar codes are classified into, for example, two kinds,i.e., eight-digit labels and 13-digit labels. The eight-digit label isconstructed by two blocks of left and right each having four digits. The13-digit label is constructed by two blocks of left and right eachhaving six digits. The left block has seven digits including two flagdigits for indicating a figure.

In reading the 13-digit label, the six-digit block is sometimes read asa four-digit block depending on a way of beam scanning. As will bedescribed in detail later, a prior art technique has a problem oferroneously reading the 13-digit label as the eight-digit label.

SUMMARY OF THE INVENTION

In view of the problems in the prior art, the present invention has anobject to provide a bar code reading method and apparatus that canreduce a read error rate. More particularly, the present inventionrelates to a method and apparatus for distinguishing labels of, forexample, the EAN-8 and EAN-13 type.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram of an eight-digit label;

FIG. 2 is a diagram of a 13-digit label;

FIG. 3 is a chart showing data in a buffer memory;

FIG. 4 is a block diagram showing a principle of an aspect of thepresent invention;

FIG. 5 is a block diagram showing an embodiment of the presentinvention;

FIG. 6 is a diagram illustrating a configuration of data provided by ademodulator 16:

FIG. 7 is a diagram view showing a configuration of data stored in abuffer memory;

FIG. 8 is a diagram showing configurations of data stored in six-digitmemory and four-digit memory;

FIGS. 9a and 9b form a flowchart explaining an operation of a centralprocessing unit shown in FIG. 6;

FIG. 10 is a block diagram showing another embodiment of the presentinvention; and

FIGS. 11a and 11b form a flowchart explaining an operation of a centralprocessing unit shown in FIG. 10.

DESCRIPTION OF THE PREFERRED EMBODIMENT

To understand the present invention more clearly, a conventional barcode reading system and its problems will be explained with reference toFIGS. 1 to 3.

Labels having bar codes are classified into two kinds, i.e., aneight-digit label 1 shown in FIG. 1 and a 13-digit label 2 shown in FIG.2.

As shown in FIG. 1, the eight-digit label 1 has a left guard bar (LGB)3, a center bar (CB) 4, and a right guard bar (RGB) 5, and isconstructed by two blocks 6 and 7. Each of the blocks 6 and 7 comprisesdata of four digits where four is a standard value.

As shown in FIG. 2, the 13-digit label 2 has a left guard bar 3, acenter bar 4, and a right guard bar 5, and is constructed by two blocks8 and 9. Each of the two blocks 8 and 9 is constructed by data having astandard value of six digits.

The eight-digit label 1 and 13-digit label 2 are read as follows:

A bar code reader converts a bar code into a digital signal which isdemodulated and stored in a buffer memory. Since the scanning speed of alight beam is high, the bar code printed on a bar code label is usuallyread by the bar code reader several times in a single reading operationin which the bar code is traced once from the right to the left or fromthe left to the right. The above-mentioned buffer memory 10, therefore,stores, in one reading operation, plural pairs of data, each pair ofdata consisting of the left and right blocks, as shown in FIG. 3. FIG. 3shows that the 13-digit label 2 has been scanned "n" times in onereading operation, and that the buffer memory 10 is storing "n" pairs ofdata. In the figure, each circled numeral denotes the number of actuallyread digits. For example, in the first scan, four digits are read fromthe left block which originally has six digits, and six digits arecorrectly read from the right block. Each bar code data of the left orright block in the buffer memory 10 is provided with a flag indicatingthe number of digits (see FIG. 7). A CPU discriminates the number ofdigits of each demodulated data stored in the buffer memory 10 byrecognizing the number of digits indicated by the flag, and stores thedata separately in a four-digit memory or a six-digit memory,respectively.

If the number of digits of the demodulated data is not four or six, theCPU determines it as a reading error and removes the data from the leftand right blocks. The CPU carries out a modulus check and a parity checkon the data stored in the four-digit or six-digit memory and picks upcorrect data that have successfully passed the checks. Thereafter, theCPU retrieves a pair of left and right data (i.e., each data in the leftblock and the right block) having the same number of digits among thedata that have successfully passed the modulus and parity checks. TheCPU then sends the pair of data to a higher device (for example, a dataprocessing unit having a processor for processing and managing bar codedata) through an interface.

This sort of conventional bar code reading system, however, has aproblem of reading six-digit data as four-digit data both in the leftand right blocks of the 13-digit label depending on a way of beamscanning (the second and "n"th readings in FIG. 3), and storing the readdata in the four-digit memory, resulting in that the 13-digit label iserroneously read as the eight-digit label.

In view of the above-mentioned problem, the present invention is basedon an idea that all data stored in the buffer memory must be rejected asan error if four-digit data is found in a buffer memory after reading a13-digit label, and has an object to reduce a read error rate in barcode reading.

FIG. 4 is a block diagram showing a bar code reading system according toan aspect of the present invention.

In FIG. 4, numeral 11 is a bar block data generating means forgenerating a plurality of bar block data in one reading operation of abar code; 21N1, 21N2, . . . , 21N1 are bar block data storage regionsfor storing bar code data of left and right bar code blocks,constructing bar codes of bar code labels, according to the numbers ofdigits N1, N2, ..., N1 of the bar code data; 22 is a number of digitsdetecting means for detecting the number of digits; and 23 is a dataexistence detecting means for detecting whether or not data exists in atleast one storage region 21Ni (i=1, 2, . . . , or l) among the bar blockdata storage regions 21N1, 21N2, ..., 21Nl.

In FIG. 4, the bar block data generating means 11 generates a pluralityof bar block data in one reading operation of a bar code whose number ofdigits is one of a plurality of predetermined standard values.

The means 22 detects the number of digits Ni (i=1, 2, . . . , l) of eachpiece of bar block data, and stores the bar block data in one bar blockdata storage region 21Ni corresponding to the number of digits.

After every bar block data obtained in one reading operation is storedin either one of the bar block data storage regions, the data existencedetecting means 23 judges whether or not data exist in a plurality ofthe bar block data storage regions. Only when there are data in a singlebar block data storage region and there is no data in the other barblock data storage regions, is it judged that the data have beencorrectly read, and the higher device is informed of this determination.If there are data in a plurality of the bar block data storage regions,it is judged to be a read error, and the contents of the bar block datastorage regions are cleared. Instead of the bar block data storageregions 21Ni, it is possible to arrange means for storing the numbers ofbar block data for respective numbers of digits. In this case, if themeans for storing the numbers of bar block data are storing the numbersof bar block data having different numbers of digits, it is judged to bea read error, and the contents of the means for storing the numbers ofbar block data are cleared.

For example, when the label indicating a bar code is either a 13-digitlabel or an eight-digit label, in the example of FIG. 4, a four-digitstorage region 21N1 and a six-digit storage region 21N2 are provided asthe bar block data storage regions. In a bar code reading operation,when at least one of left and right blocks is correctly read as asix-digit bar code, the six-digit bar code data is stored only in thestorage region 21N2 but not in the storage region 21N1. Therefore, ifthe data existence detecting means 23 detects that the storage region21N1 has no data, it is judged that the read bar code is of 13 digits.Namely, this bar code will never be erroneously read as an eight-digitbar code, thus reducing a read error rate.

FIG. 5 is a block diagram of an embodiment of the present inventioncorresponding to the aspect of FIG. 4.

In FIG. 5, 11 is a bar code reader, and 12 a light emitting portiondisposed inside the bar code reader 11. The light emitting portion 12emits a laser beam. The laser beam is formed into a predetermined beampattern by a polygon motor (not shown), and reflected by a bar code. Itis assumed that there are only eight-digit bar codes and 13-digit barcodes. Numeral 13 is a light receiving portion for receiving collectedreflected light and converting it into an electric signal.

Numeral 14 is an A/D converter that differentiates an output of thelight receiving portion 13 and converts it into a digital signal.Numeral 15 is a bar width counter for quantization. The bar widthcounter 15 counts the width of each white or black bar of the bar coderepresented by a digital signal and provides the counted value.

Numeral 16 is a demodulator for demodulating a digital signal providedby the bar width counter 15 into a digital signal representing a decimalnumeral. Numeral 17 is a bar width configuration checking portion forchecking the configuration of a bar width at the same time with thedemodulation, and storing only eight-digit or 13-digit data in a buffermemory 18. The buffer memory 18 stores, therefore, only the demodulatedeight-digit or 13-digit data whose bar width configurations have beenchecked.

The light emitting portion 13, A/D converter 14, bar width counter 15,demodulator 16, and bar width configuration checking portion 17 form thebar code data generating means shown in FIG. 4.

Numeral 19 is a central processing unit (CPU). A memory 20 storesprograms necessary for operating the CPU, and a program 20b for carryingout the modulus check. A bar code data storage region comprises afour-digit memory 21 and a six-digit memory 211. The memory 20 furtherstores a data existence detecting program 20a. The CPU 19 discriminatesthe number of digits given to left or right block data read out of thebuffer memory 18, and stores the data in the four-digit memory 21 or thesix-digit memory 211, respectively, according to the number of digits.The CPU 19 uses the modulus check program 20b stored in the memory 20,and carries out the modulus check on the data stored in the four-digitmemory 21 or the six-digit memory 211, and picks up data that havesuccessfully passed the check. Numeral 23 is a four-digit comparatorwhich compares data stored in a register 24 storing in advance four Oswith data which has passed the modulus check and is stored in a register25. The data in the register 25 is one that has been read out of thefour-digit memory 21. If all digits match one another in the comparison,i.e., if the data in the four-digit memory 21 are all Os, the comparator23 provides "1", and if mismatch occurs even in one digit, it outputs"0". Numeral 26 is a six-digit comparator which compares data stored ina register 27 storing in advance six Os with data which has passed themodulus check and is stored in a register 28. The data in the register28 is one that has been read out of the six-digit memory 211. If alldigits match one another, the comparator 26 provides "1", and ifmismatch occurs even in one digit, it outputs "0". Using the comparator23, registers 24 and 25, comparator 26, registers 27 and 28, and dataexistence detecting program 20a, the CPU 19 detects whether or notfour-digit data or six-digit data exist. Only when no four-digit dataexists, the CPU 19 sends six-digit data to the higher device. In thisway, a pair of finally correct six-digit data are sent to the higherdevice (for example, a data processor for processing and managing barcode data) through an interface.

In reading a bar code comprising four-digit bar code in one block,six-digit data will never be read so that it is not necessary to detectthe existence of six-digit data.

Next, an operation will be explained in detail.

In a single reading operation, a bar code is scanned "n" times. Areflected beam from the bar code is converted into an electric signal bythe light receiving portion 13, and then into a digital signal by theA/D converter 14. The bar width counter 15 counts a bar width of thedigital signal, and the demodulator 16 demodulates the counted valueinto a digital signal representing a decimal numeral. At the same time,the bar width configuration checking portion 17 checks a configurationof the bar width, and only the data that has four or six digits in oneblock is stored in the buffer memory 18. The format of the data storedin the buffer memory 18 is the same as that of FIG. 3.

If the read bar code is of an eight-digit label, each block of the barcode comprises four-digit data, which will not be read as six-digit datairrespective of way of scanning, so that, among bar code data stored inthe buffer memory 18, all four-digit data that have successfully passeda modulus check are stored in the four-digit memory 21. In carrying outthe modulus check, the CPU 19 uses an eight-digit modulus check program.

Since the six-digit memory 211 has no data, the comparator 26 provides asignal of "1". Namely, since no data is input from the six-digit memory211 to the register 28, the register 28 has an initial value comprisingsix digits of Os. The contents of the register 28 match the contents ofthe register 27 in which Os are stored in advance, so that thecomparator 26 provides the signal of "1" indicating that there is notsix-digit data. According to this signal of "1", it is judged that theread bar code has eight digits.

If the read bar code is of a 13-digit label, it may happen thatsix-digit data of one block is read as four-digit data depending on away of beam scanning, and stored in the four-digit memory 21. Therefore,after a single reading operation, the buffer memory 18 may contain amixture of six-digit data and four-digit data as shown in FIG. 3.

In the present embodiment, in reading the 13-digit label, it is judgedwhether or not the four-digit memory 21 has data. If it has, all data inthe buffer memory 18 are judged to be wrong and cleared. Namely, in theexample of FIG. 3, since the first, fourth, . . . , "n"th data stored inthe buffer memory 18 are six-digit data, these six-digit data are storedin the six-digit memory 211 by the CPU 19. The CPU 19 uses the dataexistence detecting program 20a to read four-digit data from thefour-digit memory 21 and stores the same in the register 25. Thecomparator 23 compares the contents of the register 25 with the contentsof the register 24 digit by digit. The contents of the register 24 areall Os. Since the four-digit data in the register 25 involves a numeralthat is not 0, the compared result does not match, and therefore, thecomparator 23 provides a signal of "0". Consequently, the CPU 19 candetect that the four-digit memory 21 has some four-digit data.

As a result, it is judged that the reading of the bar code of the13-digit label was wrong, and the contents of the buffer memory 18,four-digit memory 21, and six-digit memory 211 are all cleared.

In summary, the CPU 19 carries out the modulus check with use of theeight-digit modulus program for data stored in the four-digit memory 21,and a 13-digit modulus program for data stored in the six-digit memory211 (these programs are stored as modulus check programs in the memory20). The CPU 19 retrieves four-digit data among data that havesuccessfully passed the modulus check. Since it has been judged, asdescribed before, that the four-digit memory 21 has data and the readingoperation of the 13-digit bar code is wrong, the CPU 19 clears the datain the buffer memory 18, six-digit memory 211, and four-digit memory 21.

In this way, the data that may be erroneously recognized as aneight-digit label are rejected. Namely, a bar code of a 13-digit labelwill never be recognized as a bar code of an eight-digit label.

FIG. 6 is a view showing the format of one block data stored in thebuffer memory 18. In the figure, the one block data has six digits from○1 to ○2 . At the head of this data (referred to as data A), a flagindicating the number of digits, i.e., 6 is arranged. In the data A,each of the digits is illustrated as data B, which comprises a parityflag for identifying an even parity or an odd parity, a left/right flagfor identifying left block data or right block data, and digital datanumerals for indicating a data numeral value (one of 1 to 9) of theblock. If the data A is four-digit data, the flag for the number ofdigits is 4, and the data of ○1 to ○2 are stored. One reading operationprovides a plurality of data each with the format of the data A of FIG.6. Each data is provided with the flag of 4 or 6 for the number ofdigits, and stored in the buffer memory 18.

FIG. 7 is a view showing the data A stored in the buffer memory 18 afterone reading operation. As shown in the figure, each of "n" scans isrepresented with data of one block and a corresponding flag indicatingthe number of digits.

FIG. 8 is a view showing the contents of left and right blocks of thesix-digit memory 211 and four-digit memory 21. As shown in the figure,each memory stores even/odd parity flags, flags indicating left/rightblocks, and bar code data.

FIG. 9 is a flowchart explaining an operation of the CPU 19 shown inFIG. 5. In the figure, at a step 101, all data obtained by one readingoperation from the demodulator 16 are read. In step 102, the bar widthconfiguration checking portion 17 discriminates whether one block ofdata has four digits or six digits. In step 103, data other than thefour-digit data and six-digit data are discarded. In step 104, thebuffer memory 18 stores only the four-digit and six-digit block data.Consequently, the buffer memory 18 stores a total of "n" blocks of dataon the left and right. Next, in step 105, the data is read block byblock from the buffer memory 18, and in step 106, it is judged whetherthe read data has four digits or six digits according to a flag. If itis four-digit data, in step 107, it is judged whether the data is of aright block or of a left block according to a left/right flag. If it isright block data, in step 108, the data is stored in a right blockregion (referred to as a data memory R-4) of the four-digit memory 21.If it is left block data, in step 109, the data is stored in a leftblock region (referred to as a data memory L-4) of the four-digit memory21. Then, in step 110, a modulus check is carried out, and in step 111,a parity check is carried out. If the results of these checks are not OKin step 112, it is judged that a read error has occurred, and in step115, the contents of the buffer memory 18 and data memories R-4 and L-4are cleared. Thereafter, the reading operation is repeated.

In the step 112, if the check is OK, it is judged whether or not thedata block just read is the last block in the memory 18. If it is notthe last block, the steps 105 to 113 are repeated. After the last blockis processed through the steps 105 to 113, it is judged in step 114whether or not there is data in the six-digit memory 211. In readingfour-digit data, six-digit data are not read normally, so that, in step116, the left and right block data of the four-digit memory 21 areinformed to the upper device. In reading an eight-digit label, the step114 may be omitted.

If, in the step 106, six-digit data is detected, steps 117 to 126 areexecuted. Namely, in the step 117, it is judged whether the read data isof a left block or a right block. If it is left block data, the data isstored in a left block region (data memory L-6) of the six-digit memory211, and if it is right block data, it is stored in a right block region(data memory R-6) of the six-digit memory 211. A modulus check and aparity check are carried out in steps 120 and 121. In step 122, it isjudged whether or not results of the checks are OK. If the results arenot OK, the contents of the buffer memory 18 and six-digit memory 211are cleared. If the results are OK, the step 123 is executed, and untilthe last data block of the buffer memory 18 is processed, the steps 105and 123 are repeated. When the last block is processed, in step 124, itis judged whether the data memory R-4 or L-4 has data. If there isfour-digit data, it means that the four-digit data erroneously exists inthe data A when six-digit data are used. In step 125, therefore, thecontents of the buffer memory 18, six-digit memory 211, and four-digitmemory 21 are cleared, and the reading operation is repeated. Only whenno data exists in the data memories R-4 and L-4 in the step 124, is apair of six-digit data of the data memories R-6 and L-6 sent to thehigher device.

In the above embodiment, the four-digit memory 21 and six-digit memory211 are provided separately. It is possible, however, to storefour-digit data and six-digit data in a single memory. In this case,addresses of regions for storing the for storing the four-digit data andsix-digit data must be given in advance. According to the addresses ofthe region for six-digit data, the CPU 19 reads data, stores the data inthe register 25, and carries out the above-mentioned comparison.

In the above embodiment also, the four-digit memory (or the four-digitstorage region) and the six-digit memory (or the six-digit storageregion) are provided, however, this arrangement does not limit thepresent invention. The numbers of four-digit data and six-digit data maybe detected to judge whether or not a reading operation of a bar code iscorrect.

Such an embodiment is shown in FIG. 10.

In FIG. 10, the same parts as those of the embodiment of FIG. 5 arerepresented by the same reference numerals. What is different from FIG.5 is that a memory 201 stores a program 30 for detecting whether or notthe numbers of digits exist, instead of the data existence detectingprogram 20 of FIG. 5, and that there are arranged registers 31, 32, 34,and 35, and comparators 29 and 33 for judging whether or not there arethe numbers of four-digit data and six-digit data, instead of theregisters 24, 25, 27, and 28, and the comparators 23 and 26 for judgingwhether or not there are four-digit data and six-digit data themselves.

An operation of the embodiment shown in FIG. 10 will be explained withreference to a flowchart of FIG. 11.

In FIG. 11, steps 201 to 206 are the same as the steps 101 to 106 ofFIG. 9. In step 206, it is judged whether data has four digits or sixdigits, and in step 207 or 218, the number of data is counted. Steps 208to 214, or steps 219 to 225 are the same as those of the steps 107 to113, or steps 117 to 123 of FIG. 9. If the read data block has fourdigits in step 215, it is judged whether or not the six-digit datacounter 35 is zero. If it is not zero, it is judged that the read dataof the reading operation are wrong, and the buffer memory, etc., arecleared. Only when it is zero, the read data are informed to the higherdevice. Similarly, if the read data block has six digits, step 226judges whether or not the value in the four-digit data counter 31 iszero. Only when it is zero, the read data are informed to the higherdevice.

The present invention can handle not only eight-digit and 13-digit barcodes but also bar codes of optional number of digits. Also, the numberof blocks of a bar code is not limited to two as in the aboveembodiments.

As explained above, according to the present invention, the number ofdigits of read bar code data is detected, and according to the result ofthe detection, the bar code data is processed, thereby a read error rateof the bar code data is reduced.

I claim:
 1. A bar code reading method comprising the steps of:(a)generating, in a single reading operation, plural pieces of bar blockdata corresponding to a bar code having a number of digits which is oneof a plurality of predetermined standard values; (b) detecting therespective numbers of digits of said plural pieces of the bar blockdata; (c) storing said bar block data in storage regions correspondingto the plurality of predetermined standard values, based on the detectednumbers of digits of the bar block data; (d) detecting whether or notthe bar block data have been stored in two different storage regions;and (e) judging that the reading operation is erroneous if the bar blockdata are stored in the two different storage regions.
 2. A bar codereading method as set forth in claim 1, wherein the bar block datagenerated in said step (a) includes left bar block data and right barblock data and wherein said step (a) comprises generating plural piecesof the left bar block data plural pieces of the right bar block data. 3.A bar code reading method as set forth in claim 2, wherein said step (c)comprises storing the bar block data in left and right bar block datastorage regions corresponding to the plurality of predetermined standardvalues, based on the numbers of digits, according to the detectednumbers of digits of the bar block data, and whether the generated barblock data are left block data or right block data.
 4. A bar codereading method as set forth in claim 1, wherein said step (b) includesdiscarding the bar block data having the numbers of digits that do notmatch any of the plurality of predetermined standard values.
 5. A barcode reading method as set forth in claim 1, wherein said step (a)includes storing the generated plural pieces of bar block data in abuffer memory.
 6. A bar code reading method as set forth in claim 1,wherein said step (c) is followed by steps of carrying out a modulus 10check and a parity check.
 7. A bar code reading method as set forth inclaim 5, further comprising steps of reading said plural pieces of barblock data from said buffer memory one by one and detecting its numberof digits.
 8. A bar code reading method as set forth in claim 7, whereinsaid step (c) is followed by a step of judging whether or not all thebar block data in the buffer memory have been read, and if the result ofthe judgment is NO, repeating said step of detecting the respectivenumbers of digits of the bar block data as well as said step (c) forstoring the bar block data in the storage regions corresponding to thedetected numbers of digits of the bar block data, and if the result isYES, executing said step (d) as well as said step (e).
 9. A bar codereading method as set forth in claim 5, wherein said step (e) includes astep of clearing the contents of the buffer memory if it is detectedthat the bar block data are stored in the two different storage regions.10. A bar code reading method as set forth in claim 5, further includingsteps of judging that the bar code reading operation is correct andoutputting the read data if the bar block data are not stored in the twodifferent storage regions.
 11. A bar code reading method comprising:(a)generating, in a single reading operation, plural pieces of bar blockdata corresponding to a bar code having a number of digits which is oneof a plurality of predetermined standard values. (b) detecting therespective numbers of digits of the plural pieces of the bar block data.(c) counting the number of pieces of bar block data for each of therespective detected numbers of digits of the bar block data; (d)detecting whether the number of pieces of bar block data having twodifferent numbers of digits is greater than zero; and (e) judging thatthe reading operation is erroneous is the number of pieces of bar blockdata having two different numbers of digits is greater than zero.
 12. Abar code reading method as set forth in claim 11, wherein the bar blockdata generated in said step (a) includes left bar block data and rightbar block data, and wherein said step (a) comprises generating pluralpieces of the left and right bar block data.
 13. A bar code readingmethod as set forth in claim 12, wherein said step (c) includes storingthe bar block data in left and right bar block number storage regionscorresponding to the plurality of predetermined standard values, basedon the detected numbers of digits of the respective bar block data andwhether the bar block data are left bar block data or right bar blockdata.
 14. A bar code reading method as set forth in claim 11, whereinsaid step (b) includes discarding the bar block data having the numbersof digits that do not match any of the plurality of predeterminedstandard values.
 15. A bar code reading method as set forth in claim 11,wherein said step (a) includes storing the plural pieces of bar blockdata in a buffer memory.
 16. A bar code reading method as set forth inclaim 13, wherein said step (c) is followed by steps of carrying out amodulus 10 check and a parity check.
 17. A bar code reading method asset forth in claim 15, wherein said step (a) includes reading the pluralpieces of bar block data from the buffer memory one by one and detectingthe number of digits.
 18. A bar code reading method as set forth inclaim 17, wherein said step (c) is followed by steps of judging whetheror not all the bar block data in the buffer memory have been read, andif the result of the judgment is NO, repeating said step (b) fordetecting the respective numbers of digits of the bar block data as wellas said step (c) for counting the numbers of the bar block data for therespective detected numbers of digits of the bar block data, and if theresult is YES, executing said step (d) for detecting whether or not thenumbers of bar block data having two different numbers of digits havebeen counted, as well as said step (e) for judging that the bar codereading operation is erroneous if the numbers of bar block data havingtwo different numbers of digits have been counted.
 19. A bar codereading method as set forth in claim 15, further including a step ofclearing the contents of the buffer memory if the numbers of bar blockdata having two different numbers of digits have been counted.
 20. A barcode reading method as set forth in claim 15, further including steps ofjudging that the bar code reading operation is correct and outputtingthe read data if two different numbers of bar block data greater thanzero have not been counted.
 21. A bar code reading apparatuscomprising:bar block data generating means for generating, in a singlereading operation, plural pieces of bar block data corresponding to abar code having a number of digits which is one of a plurality ofpredetermined standard values; means for detecting the respectivenumbers of digits of said plural pieces of the bar block data obtainedby said bar block data generating means; a plurality of bar block datastorage means corresponding to the standard values respectively; anddata existence detecting means for detecting whether or not at least twoof the bar block data storage means have different bar block data, eachpiece of the bar block data output from said bar block data generatingmeans being stored in one of the bar block data storage meanscorresponding to the number of digits obtained at the output of saidmeans for detecting the number of digits, the bar code reading operationbeing judged to be erroneous if said data existence detecting meansjudges that at least two different bar block data storage means have barblock data.
 22. A bar code reading apparatus as set forth in claim 21,wherein said bar block data storage means comprises:first registerscorresponding to respective numbers of digits, having a number of digitscorresponding to the numbers of digits of the detected bar block data,for storing said bar block data; second registers having the same numberof digits, for storing all Os; and comparing means for the respectivenumbers of digits, said data existence detecting means detecting theexistence of data by comparing the contents of the registers digit bydigit.
 23. A bar code reading apparatus as set forth in claim 21,wherein said means for detecting the numbers of digits includes meansfor discarding the bar block data having the numbers of digits that donot match any of the plurality of predetermined standard values.
 24. Abar code reading apparatus as set froth in claim 21, wherein said barblock data generating means includes a buffer memory for storing thegenerated plural pieces of bar block data.
 25. A bar code readingapparatus as set forth in claim 21, further comprising means forcarrying out a modulus check and a parity check on the bar block datastored in said bar block data storage means.
 26. A bar code readingapparatus as set forth in claim 24, wherein said means for detecting therespective numbers of digits reads the plural pieces of bar block datafrom said buffer memory one by one and detects the number of digits. 27.A bar code reading apparatus as set forth in claim 26, wherein said dataexistence detecting means has means for judging whether or not all thebar block data in the buffer memory have been read, means for causing,if a result of the judgment is NO, said means for detecting therespective numbers of digits of the bar block data to detect therespective number of digits and said plural bar block data storage meansto store the bar block data in storage regions corresponding to thedetected numbers of digits of the bar block data,means for causing saiddata existence detecting means to detect, if the result is YES, whetheror not two different ones of the storage regions have bar block data,and means for judging that the bar code reading operation is wrong ifthe two different storage regions have bar block data.
 28. A bar codereading apparatus as set forth in claim 24, further comprising means forclearing the contents of said buffer memory if said two differentstorage regions have bar block data.
 29. A bar code reading apparatus asset forth in claim 24, further comprising means for judging that the barcode reading operation is correct and informing the read data to ahigher device if the two different storage regions do not have bar blockdata.
 30. A bar code reading apparatus comprising:bar block datagenerating means for generating, in a single reading operation, pluralpieces of bar block data corresponding to a bar code having a number ofdigits which is one of a plurality of predetermined standard values;means for detecting the respective numbers of digits of said pluralpieces of the bar block data obtained by said bar block data generatingmeans; a plurality of counting means provided corresponding to saidplurality of standard values respectively, for counting the numbers ofbar block data; and storage means for storing the numbers of bar blockdata respectively counted by said counting means; means for detectingwhether or not at least two different of said plurality of countingmeans have the number of bar block data, wherein the numbers of the barblock data output from said bar block data generating means are storedin said storage means for storing the numbers of bar block datarespectively, counted by said means for detecting the existence of thenumbers of digits, the reading operation of the bar code is judged to bewrong if said means for detecting the existence of the numbers of digitsjudges that the numbers of digits for at least two pieces of bar blockdata counted by said counting means, are different.
 31. A bar codereading apparatus as set forth in claim 30, wherein said means forcounting the numbers of bar block data comprises:registers correspondingto the respective numbers of digits, for storing the numbers of barblock data according to the detected numbers of digits of the bar blockdata; registers for storing Os; and comparing means, said means fordetecting the existence of the numbers of digits detecting the existenceof different numbers of digits by comparing the contents of theregisters for every number of digits.
 32. A bar code reading apparatusas set forth in claim 30, wherein said means for detecting the existenceof the numbers of digits includes means for discarding the bar blockdata having the numbers of digits that do not match any of the pluralityof predetermined standard values.
 33. A bar code reading apparatus asset forth in claim 30, wherein said plurality of bar block datagenerating means includes a buffer memory for storing the generatedplural pieces of bar block data.
 34. A bar code reading apparatus as setforth in claim 30, further comprising means for carrying out a moduluscheck and a parity check on the bar block data output from said barblock data generating means.
 35. A bar code reading apparatus as setforth in claim 33, wherein said means for detecting the numbers ofdigits reads the plural pieces of bar block data from said buffer memoryone by one and detect its number of digits.
 36. A bar code readingapparatus as set forth in claim 35, wherein said means for detecting theexistence of the numbers of digits has means for judging whether or notall the bar block data in said buffer memory have been read, furthercomprising:means for causing, if a result of the judgment is NO, saidmeans for detecting the respective numbers of digits of the bar blockdata to detect the respective numbers of digits and said counting meansto count the number of bar block data for each of the detected numbersof digits of the bar block data, means for detecting, if the result isYES, whether or not the numbers of two different kinds of bar block datahave been counted, and means for judging that the bar code readingoperation is wrong is the numbers of the two different kinds of barblock data have been counted.
 37. A bar code reading apparatus as setforth in claim 33, further comprising means for clearing the contents ofsaid buffer memory if the numbers of the two different kinds of barblock data have been counted.
 38. A bar code reading apparatus as setforth in claim 33, further comprising means for judging that said barcode reading operation is correct and outputting the read data if thenumbers of the digits counted for one of the two different kinds of barblock data is zero.